package xyz.zhzby.cyzx.acl.service;

import xyz.zhzby.cyzx.acl.dto.request.UserPageRequest;
import xyz.zhzby.cyzx.acl.dto.response.UserResponse;
import xyz.zhzby.cyzx.acl.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.zhzby.cyzx.servicebase.domain.PageResponse;
import xyz.zhzby.cyzx.servicebase.domain.RestResponse;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户类 服务类
 * </p>
 *
 * @author zby
 * @since 2021-12-07
 */
public interface IUserService extends IService<User> {

    User getUserByUsername(String username);

    RestResponse<String> saveUser(User user);

    RestResponse<PageResponse<UserResponse>> getUsers(UserPageRequest pageRequest);

    RestResponse<String> updateUser(User user);

    RestResponse<UserResponse> getUserById(Long userId);

    RestResponse<Map<String, Object>> getUserInfoById(Long userId);

    List<Map<String, Object>> getUserInfoByIdList(List<Long> userIds);

    RestResponse<String> deleteUser(Long userId);

    RestResponse<String> deleteUserBatch(List<Long> userIds);
}
